/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ps.server.classes;

import java.util.Hashtable;

/**
 *
 * @author Ricardo
 */
public class products {

    private String id;
    private String id_manufacturer;
    private String id_supplier;
    private String id_category_default;
    private String newproduct;
    private String cache_default_sttribute;
    private String id_default_image;
    private String id_default_combination;
    private String id_tax_rules_group;
    private int minimal_quantity;
    private double price;
    private double additional_shipping_cost;
    private double wholesale_price;
    private boolean on_sale;
    private boolean online_only;
    private double ecotax;
    private String unity;
    private double unit_price_ratio;
    private String reference;
    private String supplier_reference;
    private String location;
    private double width;
    private double heigth;
    private double depth;
    private double weight;
    private boolean quantity_discount;
    private String customizable;
    private String uploadable_files;
    private String text_fields;
    private boolean active;
    private boolean available_for_order;
    private String available_date;
    private String condition;
    private boolean show_price;
    private String ean13;
    private String upc;
    private boolean indexed;
    private String visibility;
    private boolean cache_is_pack;
    private boolean is_virtual;
    private boolean cache_has_attachments;
    private String date_add;
    private String date_upd;
    private boolean advanced_stock_management;
    private String[][] meta_description;
    private String[][] meta_keywords;
    private String[][] meta_title;
    private String[][] link_rewrite;
    private String[][] name;
    private String[][] description;
    private String[][] description_short;
    private String[][] available_now;
    private String[][] available_later;
    private String[] categories;
    private String[] images;
    private String[] combinations;
    private String[] product_option_values;
    private String[][] product_features;
    private String[] tags;
    private int column = 59;

    
    private Hashtable condicion;
private Hashtable visibilidad;
    public products(){
    condicion= new Hashtable();
    condicion.put("new", "nuovo");
    condicion.put("used", "Occasione");
    condicion.put("refurbished", "Imesso a nuovo");
    this.visibilidad= new Hashtable();
    this.visibilidad.put("both", "Everywhere");
    this.visibilidad.put("catalog", "Catalog only");
    this.visibilidad.put("search", "Search only");
        this.visibilidad.put("none", "Nowhere");

    }

    public Hashtable getVisibilidad() {
        return visibilidad;
    }
    
    
    public Hashtable getCondicion() {
        return condicion;
    }
    
    
    public boolean isAdvanced_stock_management() {
        return advanced_stock_management;
    }

    public void setAdvanced_stock_management(boolean advanced_stock_management) {
        this.advanced_stock_management = advanced_stock_management;
    }

    public String getAvailable_date() {
        return available_date;
    }

    public void setAvailable_date(String available_date) {
        this.available_date = available_date;
    }

    public String getDate_add() {
        return date_add;
    }

    public void setDate_add(String date_add) {
        this.date_add = date_add;
    }

    public String getDate_upd() {
        return date_upd;
    }

    public void setDate_upd(String date_upd) {
        this.date_upd = date_upd;
    }

    public boolean isIs_virtual() {
        return is_virtual;
    }

    public void setIs_virtual(boolean is_virtual) {
        this.is_virtual = is_virtual;
    }

    public double getUnit_price_ratio() {
        return unit_price_ratio;
    }

    public void setUnit_price_ratio(double unit_price_ratio) {
        this.unit_price_ratio = unit_price_ratio;
    }

    public String getVisibility() {
        return visibility;
    }

    public void setVisibility(String visibility) {
        this.visibility = visibility;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getDepth() {
        return depth;
    }

    public void setDepth(double depth) {
        this.depth = depth;
    }

    public String getId_category_default() {
        return id_category_default;
    }

    public void setId_category_default(String id_category_default) {
        this.id_category_default = id_category_default;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public double getAdditional_shipping_cost() {
        return additional_shipping_cost;
    }

    public void setAdditional_shipping_cost(double additional_shipping_cost) {
        this.additional_shipping_cost = additional_shipping_cost;
    }

    public boolean isAvailable_for_order() {
        return available_for_order;
    }

    public void setAvailable_for_order(boolean available_for_order) {
        this.available_for_order = available_for_order;
    }

    public String[][] getAvailable_later() {
        return available_later;
    }

    public void setAvailable_later(String[][] available_later) {
        this.available_later = available_later;
    }

    public String[][] getAvailable_now() {
        return available_now;
    }

    public void setAvailable_now(String[][] available_now) {
        this.available_now = available_now;
    }

    public String getCache_default_sttribute() {
        return cache_default_sttribute;
    }

    public void setCache_default_sttribute(String cache_default_sttribute) {
        this.cache_default_sttribute = cache_default_sttribute;
    }

    public boolean isCache_has_attachments() {
        return cache_has_attachments;
    }

    public void setCache_has_attachments(boolean cache_has_attachments) {
        this.cache_has_attachments = cache_has_attachments;
    }

    public boolean isCache_is_pack() {
        return cache_is_pack;
    }

    public void setCache_is_pack(boolean cache_is_pack) {
        this.cache_is_pack = cache_is_pack;
    }

    public String[] getCategories() {
        return categories;
    }

    public void setCategories(String[] categories) {
        this.categories = categories;
    }

    public String[] getCombinations() {
        return combinations;
    }

    public void setCombinations(String[] combinations) {
        this.combinations = combinations;
    }

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public String getCustomizable() {
        return customizable;
    }

    public void setCustomizable(String customizable) {
        this.customizable = customizable;
    }

    public String[][] getDescription() {
        return description;
    }

    public void setDescription(String[][] description) {
        this.description = description;
    }

    public String[][] getDescription_short() {
        return description_short;
    }

    public void setDescription_short(String[][] description_short) {
        this.description_short = description_short;
    }

    public String getEan13() {
        return ean13;
    }

    public void setEan13(String ean13) {
        this.ean13 = ean13;
    }

    public double getEcotax() {
        return ecotax;
    }

    public void setEcotax(double ecotax) {
        this.ecotax = ecotax;
    }

    public double getHeigth() {
        return heigth;
    }

    public void setHeigth(double heigth) {
        this.heigth = heigth;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId_default_combination() {
        return id_default_combination;
    }

    public void setId_default_combination(String id_default_combination) {
        this.id_default_combination = id_default_combination;
    }

    public String getId_default_image() {
        return id_default_image;
    }

    public void setId_default_image(String id_default_image) {
        this.id_default_image = id_default_image;
    }

    public String getId_manufacturer() {
        return id_manufacturer;
    }

    public void setId_manufacturer(String id_manufacturer) {
        this.id_manufacturer = id_manufacturer;
    }

    public String getId_supplier() {
        return id_supplier;
    }

    public void setId_supplier(String id_supplier) {
        this.id_supplier = id_supplier;
    }

    public String getId_tax_rules_group() {
        return id_tax_rules_group;
    }

    public void setId_tax_rules_group(String id_tax_rules_group) {
        this.id_tax_rules_group = id_tax_rules_group;
    }

    public String[] getImages() {
        return images;
    }

    public void setImages(String[] images) {
        this.images = images;
    }

    public boolean isIndexed() {
        return indexed;
    }

    public void setIndexed(boolean indexed) {
        this.indexed = indexed;
    }

    public String[][] getLink_rewrite() {
        return link_rewrite;
    }

    public void setLink_rewrite(String[][] link_rewrite) {
        this.link_rewrite = link_rewrite;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String[][] getMeta_description() {
        return meta_description;
    }

    public void setMeta_description(String[][] meta_description) {
        this.meta_description = meta_description;
    }

    public String[][] getMeta_keywords() {
        return meta_keywords;
    }

    public void setMeta_keywords(String[][] meta_keywords) {
        this.meta_keywords = meta_keywords;
    }

    public String[][] getMeta_title() {
        return meta_title;
    }

    public void setMeta_title(String[][] meta_title) {
        this.meta_title = meta_title;
    }

    public int getMinimal_quantity() {
        return minimal_quantity;
    }

    public void setMinimal_quantity(int minimal_quantity) {
        this.minimal_quantity = minimal_quantity;
    }

    public String[][] getName() {
        return name;
    }

    public void setName(String[][] name) {
        this.name = name;
    }

    public String getNewproduct() {
        return newproduct;
    }

    public void setNewproduct(String newproduct) {
        this.newproduct = newproduct;
    }

    public boolean isOn_sale() {
        return on_sale;
    }

    public void setOn_sale(boolean on_sale) {
        this.on_sale = on_sale;
    }

    public boolean isOnline_only() {
        return online_only;
    }

    public void setOnline_only(boolean online_only) {
        this.online_only = online_only;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String[][] getProduct_features() {
        return product_features;
    }

    public void setProduct_features(String[][] product_features) {
        this.product_features = product_features;
    }

    public String[] getProduct_option_values() {
        return product_option_values;
    }

    public void setProduct_option_values(String[] product_option_values) {
        this.product_option_values = product_option_values;
    }

    public boolean isQuantity_discount() {
        return quantity_discount;
    }

    public void setQuantity_discount(boolean quantity_discount) {
        this.quantity_discount = quantity_discount;
    }

    public String getReference() {
        return reference;
    }

    public void setReference(String reference) {
        this.reference = reference;
    }

    public boolean isShow_price() {
        return show_price;
    }

    public void setShow_price(boolean show_price) {
        this.show_price = show_price;
    }

    public String getSupplier_reference() {
        return supplier_reference;
    }

    public void setSupplier_reference(String supplier_reference) {
        this.supplier_reference = supplier_reference;
    }

    public String[] getTags() {
        return tags;
    }

    public void setTags(String[] tags) {
        this.tags = tags;
    }

    public String getText_fields() {
        return text_fields;
    }

    public void setText_fields(String text_fields) {
        this.text_fields = text_fields;
    }

    public String getUnity() {
        return unity;
    }

    public void setUnity(String unity) {
        this.unity = unity;
    }

    public String getUpc() {
        return upc;
    }

    public void setUpc(String upc) {
        this.upc = upc;
    }

    public String getUploadable_files() {
        return uploadable_files;
    }

    public void setUploadable_files(String uploadable_files) {
        this.uploadable_files = uploadable_files;
    }

    public double getWholesale_price() {
        return wholesale_price;
    }

    public void setWholesale_price(double wholesale_price) {
        this.wholesale_price = wholesale_price;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public String toXML() {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
        xml += "<prestashop xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n";
        xml += "<product>\n";
        xml += "<id></id>\n";
        xml += "<id_manufacturer></id_manufacturer>\n";
        xml += "<id_supplier></id_supplier>\n";
        xml += "<id_category_default></id_category_default>\n";
        xml += "<new></new>\n";
        xml += "<cache_default_attribute></cache_default_attribute>\n";
        xml += "<id_default_image></id_default_image>\n";
        xml += "<id_default_combination></id_default_combination>\n";
        xml += "<id_tax_rules_group></id_tax_rules_group>\n";
        xml += "<minimal_quantity></minimal_quantity>\n";
        xml += "<price></price>\n";
        xml += "<additional_shipping_cost></additional_shipping_cost>\n";
        xml += "<wholesale_price></wholesale_price>\n";
        xml += "<on_sale></on_sale>\n";
        xml += "<online_only></online_only>\n";
        xml += "<ecotax></ecotax>\n";
        xml += "<unity></unity>\n";
        xml += "<unit_price_ratio></unit_price_ratio>\n";
        xml += "<reference></reference>\n";
        xml += "<supplier_reference></supplier_reference>\n";
        xml += "<location></location>\n";
        xml += "<width></width>\n";
        xml += "<height></height>\n";
        xml += "<depth></depth>\n";
        xml += "<weight></weight>\n";
        xml += "<quantity_discount></quantity_discount>\n";
        xml += "<customizable></customizable>\n";
        xml += "<uploadable_files></uploadable_files>\n";
        xml += "<text_fields></text_fields>\n";
        xml += "<active></active>\n";
        xml += "<available_for_order></available_for_order>\n";
        xml += "<available_date></available_date>\n";
        xml += "<condition></condition>\n";
        xml += "<show_price></show_price>\n";
        xml += "<ean13></ean13>\n";
        xml += "<upc></upc>\n";
        xml += "<indexed></indexed>\n";
        xml += "<visibility></visibility>\n";
        xml += "<cache_is_pack></cache_is_pack>\n";
        xml += "<is_virtual></is_virtual>\n";
        xml += "<cache_has_attachments></cache_has_attachments>\n";
        xml += "<date_add></date_add>\n";
        xml += "<date_upd></date_upd>\n";
        xml += "<advanced_stock_management></advanced_stock_management>\n";

        xml += "<meta_description>\n";
        for (int x = 0; meta_description.length > x; x++) {
            xml += "<language id=\"" + meta_description[x][0] + " \">" + meta_description[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</meta_description>\n";
        xml += "<meta_keywords>\n";
        for (int x = 0; meta_keywords.length > x; x++) {
            xml += "<language id=\"" + meta_keywords[x][0] + " \">" + meta_keywords[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</meta_keywords>\n";
        xml += "<meta_title>\n";
        for (int x = 0; meta_title.length > x; x++) {
            xml += "<language id=\"" + meta_title[x][0] + " \">" + meta_title[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</meta_title>\n";
        xml += "<link_rewrite>\n";
        for (int x = 0; link_rewrite.length > x; x++) {
            xml += "<language id=\"" + link_rewrite[x][0] + " \">" + link_rewrite[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</link_rewrite>\n";
        xml += "<name>\n";
        for (int x = 0; name.length > x; x++) {
            xml += "<language id=\"" + name[x][0] + " \">" + name[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</name>\n";
        xml += "<description>\n";
        for (int x = 0; description.length > x; x++) {
            xml += "<language id=\"" + description[x][0] + " \">" + description[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</description>\n";
        xml += "<description_short>\n";
        for (int x = 0; description_short.length > x; x++) {
            xml += "<language id=\"" + description_short[x][0] + " \">" + description_short[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</description_short>\n";
        xml += "<available_now>\n";
        for (int x = 0; available_now.length > x; x++) {
            xml += "<language id=\"" + available_now[x][0] + " \">" + available_now[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</available_now>\n";
        xml += "<available_later>\n";
        for (int x = 0; available_later.length > x; x++) {
            xml += "<language id=\"" + available_later[x][0] + " \">" + available_later[x][1] + "</language>\n";
        }
        //<language id="3"></language>
        //<language id="5"></language>
        xml += "</available_later>\n";

        xml += "<associations>\n";
        xml += "<categories>\n";
        for (int x = 0; categories.length > x; x++) {
            xml += "<category>\n";
            xml += "<id>" + this.categories[x] + "</id>\n";
            xml += "</category>\n";
        }
        xml += "</categories>\n";
        xml += "<images>\n";
        for (int x = 0; images.length > x; x++) {
            xml += "<image>\n";
            xml += "<id>" + images[x] + "</id>\n";
            xml += "</image>\n";
        }
        xml += "</images>\n";
        xml += "<combinations>\n";
        for (int x = 0; combinations.length > x; x++) {
            xml += "<combinations>\n";
            xml += "<id>" + this.combinations[x] + "</id>\n";
            xml += "</combinations>\n";
        }
        xml += "</combinations>\n";
        xml += "<product_option_values>\n";
        for (int x = 0; this.product_option_values.length > x; x++) {
            xml += "<product_options_values>\n";
            xml += "<id>" + this.product_option_values[x] + "</id>\n";
            xml += "</product_options_values>\n";
        }
        xml += "</product_option_values>\n";

        xml += "<product_features>\n";
        for (int x = 0; this.product_features.length > x; x++) {
            xml += "<product_feature>\n";
            xml += "<id>" + this.product_features[x] + "</id>\n";
            xml += "<id_feature_value>" + this.product_features[x] + "</id_feature_value>\n";
            xml += "</product_feature>\n";
        }
        xml += "</product_features>\n";
        xml += "<tags>\n";
        for (int x = 0; this.tags.length > x; x++) {
            xml += "<tag>\n";
            xml += "<id>" + this.tags[x] + "</id>\n";
            xml += "</tag>\n";
        }
        xml += "</tags>\n";
        xml += "</associations>\n";
        xml += "</product>\n";
        xml += "</prestashop>\n";

        return xml;

    }

    public int getColumn() {
        return this.column;
    }

    public String[] GetMetaData() {
        return new String[]{
                    "id",
                    "id_manufacturer",
                    "id_supplier",
                    "id_category_default",
                    "newproduct",
                    "cache_default_sttribute",
                    "id_default_image",
                    "id_default_combination",
                    "id_tax_rules_group",
                    "minimal_quantity",
                    "price",
                    "additional_shipping_cost",
                    "wholesale_price",
                    "on_sale",
                    "online_only",
                    "ecotax",
                    "unit_price_ratio",
                    "reference",
                    "supplier_reference",
                    "location",
                    "width",
                    "heigth",
                    "depth",
                    "weight",
                    "quantity_discount",
                    "customizable",
                    "uploadable_files",
                    "text_fields",
                    "active",
                    "available_for_order",
                    "available_date",
                    "condition",
                    "show_price",
                    "ean13",
                    "upc",
                    "indexed",
                    "visibility",
                    "cache_is_pack",
                    "is_virtual",
                    "cache_has_attachments",
                    "date_add",
                    "date_upd",
                    "advanced_stock_management",
                    "meta_description",
                    "meta_keywords",
                    "meta_title",
                    "link_rewrite",
                    "name",
                    "description",
                    "description_short",
                    "available_now",
                    "available_later",
                    "categories",
                    "images",
                    "combinations",
                    "product_option_values",
                    "product_features",
                    "tags"
        };
    }
}